import {http} from "@/service/http";

const prefix = '/DbFirst'


/**
 * 根据数据表名生成整体框架包含model
 * @param connID
 * @returns
 */
export const getAllFrameFilesByTableNames = (connID: string, tableName: string[]) => {
  return http({
    method: 'POST',
    url: `${prefix}/GetAllFrameFilesByTableNames`,
    data: tableName
  })
}


/**
 * 获取框架文件
 * @returns
 */
export const getFrameFiles = () => {
  return http({
    method: 'GET',
    url: `${prefix}/GetFrameFiles`,
  })
}


/**
 * 获取仓库存储服务 需要指定表明和链接ID
 * @param connID
 * @param tableName
 * @returns
 */
export const getFrameFilesByTableNames = (connID: string, tableName: string[]) => {
  return http({
    method: 'POST',
    url: `${prefix}/GetFrameFilesByTableNames`,
    data: tableName
  })
}


/**
 * 获取控制器 需要指定表明和链接ID
 * @param connID
 * @param tableName
 * @returns
 */
export const getFrameFilesByTableNamesForController = (connID: string, tableName: string[]) => {
  return http({
    method: 'POST',
    url: `${prefix}/GetFrameFilesByTableNamesForController`,
    data: tableName
  })
}


/**
 * 获取实体 需要指定表明和链接ID
 * @param connID
 * @param tableName
 * @returns
 */
export const getFrameFilesByTableNamesForEntity = (connID: string, tableName: string[]) => {
  return http({
    method: 'POST',
    url: `${prefix}/GetFrameFilesByTableNamesForEntity`,
    data: tableName
  })
}

